<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>废物的聊天室</title>
</head>

<body>
    <div>
        <h2>服务器返回的消息:</h2>
        <p id="retmsg"></p>
    </div>
    <div>
        <input type="text" id="msg">
    </div>
    <p>
        <button>发送</button>
    </p>
</body>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.3/jquery.js"></script>
<script>
    $("button").click(function(){
        let msg = $("#msg").val();
        let ipAddr = "http://10.21.8.188/abc"
        $.get(ipAddr,{msg:msg},function(res){
            $("#retmsg").html(res)
        })
    })
</script>
</html>